project(IOExamples)

include_directories(
    ../
    )
# 将Stl 转到 Mhd
ADD_EXECUTABLE(Vtk_StlToMhd Vtk_StlToMhd.cpp)
TARGET_LINK_LIBRARIES(Vtk_StlToMhd ${VTK_LIBRARIES})

# 读取mha图像，实际是imagedata
ADD_EXECUTABLE(Vtk_MhaReader Vtk_MhaReader.cpp)
TARGET_LINK_LIBRARIES(Vtk_MhaReader ${VTK_LIBRARIES})
vtk_module_autoinit(TARGETS Vtk_MhaReader MODULES ${VTK_LIBRARIES})

# 读取vtk图像
ADD_EXECUTABLE(Vtk_VtkReader Vtk_VtkReader.cpp)
TARGET_LINK_LIBRARIES(Vtk_VtkReader ${VTK_LIBRARIES})
vtk_module_autoinit(TARGETS Vtk_VtkReader MODULES ${VTK_LIBRARIES})

# 读取stl图像
ADD_EXECUTABLE(Vtk_StlReader Vtk_StlReader.cpp)
TARGET_LINK_LIBRARIES(Vtk_StlReader ${VTK_LIBRARIES})
vtk_module_autoinit(TARGETS Vtk_StlReader MODULES ${VTK_LIBRARIES})

# 生成和保存图像
ADD_EXECUTABLE(Vtk_CreateWriteImage Vtk_CreateWriteImage.cpp)
TARGET_LINK_LIBRARIES(Vtk_CreateWriteImage ${VTK_LIBRARIES})


